#!/bin/bash
pkg update -y
pkg upgrade -y
pkg install git perl nodejs-lts wget curl nano cronie moreutils -y
git clone -b v3 https://gitee.com/lcy0828/jd-base jd
cd jd
mkdir config
cp sample/config.sh.sample config/config.sh
cp sample/computer.list.sample config/crontab.list
bash git_pull.sh
crontab config/crontab.list
cp sample/auth.json config/auth.json
cp  config/auth.json  ./config/cp.json
cat config/cp.json |  sed  's/adminadmin/000000/g' > ./config/auth.json
cp  config/auth.json ./config/cp1.json
cat config/cp1.json |  sed  's/admin/root/g' > ./config/auth.json
cd panel
npm config set registry https://registry.npm.taobao.org
npm install || npm install --registry=https://registry.npm.taobao.org
npm install -g pm2 -registry=https://registry.npm.taobao.org
pm2 start server.js

echo "账号：root"
echo "密码：000000"
#systemctl stop firewalld.service

